package com.lb.spring.framework.beans;

/**
 * @Title: LbBeanWrapper
 * @Description: BeanWrapper对原生对象的包装，通过构造方法存储原始对象，放入factoryBeanInstanceCache的只是BeanWrapper
 * @Author lb
 * @Date 2019/04/16  18:00
 */
public class LbBeanWrapper {
    private Object wrappedInstance;
    private Class<?> wrappedClass;

    public LbBeanWrapper(Object wrappedInstance){
        this.wrappedInstance = wrappedInstance;
    }

    public Object getWrappedInstance(){
        return this.wrappedInstance;
    }

    // 返回代理以后的Class
    // 可能会是这个 $Proxy0
    public Class<?> getWrappedClass(){
        return this.wrappedInstance.getClass();
    }
}
